@extends('layouts.back_stage')
@section('content')
    <link rel="stylesheet" href="{{env('CDN_DOMAIN_NAME')}}/css/dateSelect.css">
    <link rel="stylesheet" href="{{env('CDN_DOMAIN_NAME')}}/css/addComeGo.css?v=1.0.2">
    <script src="{{env('CDN_DOMAIN_NAME')}}/js/dateSelect.js"></script>
    <style>
        .address {
            border-color: #cfdadd;
            border-radius: 2px;
            width: 150px;
            height: 30px;
            padding: 6px 10px;
            font-size: 12px;
            line-height: 1.42857143;
            color: #555;
            background-color: #fff;
            background-image: none;
            border: 1px solid #cfdadd;
            box-shadow: none;
            -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
            -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
        }
    </style>
    <div class="container">
        <div class="row">
            <div style="margin: 30px;">
                <h3 >@if(isset($_GET['id']))修改@else添加@endif供应商信息</h3>
            </div>
            <div class="col-md-10 col-md-offset-1">
                <form role="form">
                    <div class="form-group">
                        <p class="row_p3 row_p" style="width:235px;"><span class="row_sp"><span class="xing">*</span>供应商简称：</span><input class="form-control row_inp3 row_inp" maxlength="10" type="text" autocomplete="off" autocorrect="off" id="alias" value="{{$idInfos->alias or ''}}" placeholder="简称" /></p>
                        <p class="row_p1 row_p"><span class="row_sp"><span class="xing">*</span>供应类型：</span>
                            <select class="address row_sel row_right"  id="supply_type">
                                @if(isset($idInfos->supply_type))
                                <option value="{{$idInfos->supply_type}}">{{$idInfos->supply_type}}</option>
                                @endif
                                <option value="">请选择</option>
                                <option value="面料">面料</option>
                                <option value="辅料">辅料</option>
                                <option value="毛皮">毛皮</option>
                                <option value="针织">针织</option>
                                <option value="花边">花边</option>
                                <option value="梭织">梭织</option>
                                <option value="工艺">工艺</option>
                                <option value="罗口">罗口</option>
                                <option value="加工厂">加工厂</option>
                            </select>
                        </p>
                        <p class="row_p2 row_p" ><span class="row_sp"><span class="xing">*</span>供应商名称：</span><input class="form-control row_inp2 row_inp" maxlength="17" type="text" autocomplete="off" autocorrect="off" id="name" value="{{$idInfos->name or ''}}" placeholder="名称" /></p>
                        <p class="row_p4 row_p" ><span class="row_sp">简拼：</span><input class="form-control row_inp4 row_inp" maxlength="10" type="text" autocomplete="off" autocorrect="off" id="short_name" value="{{$idInfos->short_name or ''}}" placeholder="简拼" /></p>
                    </div>
                    <div class="form-group">
                        <p class="row_p9 row_p" ><span class="row_sp"><span class="xing">*</span>手机号：</span><input class="form-control row_inp9 row_right" maxlength="11" type="text" autocomplete="off" autocorrect="off" id="tel" maxlength="11" value="{{$idInfos->tel or ''}}" placeholder="手机号" /></p>
                        <p class="row_p10 row_p" ><span class="row_sp"><span class="xing">*</span>座机：</span><input class="form-control row_inp10 row_right" style="margin-left:1px;" maxlength="12" type="text" autocomplete="off" autocorrect="off" id="seat_tel" value="{{$idInfos->seat_tel or ''}}" placeholder="格式010-123456" /></p>
                        <p class="row_p13 row_p" ><span class="row_sp">银行账号：</span><input class="form-control row_inp13 row_inp" type="text" autocomplete="off" autocorrect="off" id="bank_account"  value="{{$idInfos->bank_account or ''}}" placeholder="银行账号" /></p>
                    </div>
                    <div class="form-group">
                        <p class="row_p7 row_p" ><span class="row_sp"><span class="KONG">*</span>供应商地址：</span>
                            <div>
                            <select name="web_select" id="web_select" class="web_select address prov" >
                                <option value="">省</option>
                                @foreach ($data as $area)
                                    <option value="{{ $area->area_bh }}"
                                            @if(isset($idInfos->area_bh) && $idInfos->area_bh >0 && $area_code['area_code1']['area_bh']==$area->area_bh)
                                            selected="selected"
                                            @endif
                                    >{{ $area->area_name }}
                                    </option>
                                @endforeach
                            </select>
                            <select name="web_select1" id="web_select1" class="web_select address city">
                                <option value="">市</option>
                                @if($area_code['area_code2'])
                                    <option value="{{$area_code['area_code2']['area_bh']}}" selected>{{$area_code['area_code2']['area_name']}}</option>
                                @endif
                            </select>
                            <select name="web_select2" id="web_select2" class="address region">
                                <option value="">区、县</option>
                                @if($area_code['area_code3'])
                                    <option value="{{$area_code['area_code3']['area_bh']}}" selected>{{$area_code['area_code3']['area_name']}}</option>
                                @endif
                            </select>
                            </div>
                            <input class="form-control row_inp74 row_inp" style="margin-top: 15px;width:915px;" type="text" autocomplete="off" autocorrect="off" maxlength="20" value="{{$idInfos->address_detail or ''}}" id="address_detail" placeholder="详细地址" />
                        </p>
                    </div>
                    <div class="form-group">
                        <p class="row_p8 row_p" ><span class="row_sp"><span class="KONG">*</span>联系人：</span><input class="form-control row_inp8 row_right" maxlength="4" type="text" autocomplete="off" autocorrect="off" id="contact_person" placeholder="联系人"  value="{{$idInfos->contact_person or ''}}"/></p>
                        <p class="row_p11 row_p" ><span class="row_sp"><span class="KONG">*</span>合作开始：</span><input id="date1" readonly class="form-control row_inp11 cooperation_start" type="text" placeholder="开始时间"
                              value="@if(!isset($idInfos->cooperation_start))@else @if($idInfos->cooperation_start =='0000-00-00 00:00:00')@else{{str_limit($idInfos->cooperation_start,10,'')}}@endif @endif"/></p>
                    </div>
                    <div class="form-group">
                        <p class="row_p14 row_p" ><span class="row_sp"><span class="KONG">*</span>备注：</span>
                            <textarea id="remarks" cols="30" rows="10" maxlength="30" class="form-control row_inp14 row_inp"> {{$idInfos->remarks or ''}}</textarea>
                    </div>
                    <div class="form-group">
                        <button type='button' abc="{{$id}}" class='btn btn-success sureYes' style="float:left;margin-left:861px;">@if(isset($_GET['id']))保存@else添加@endif</button>
                    </div>

                </form>
            </div>
        </div>
    </div>

    <script>
        /*日期插件初始化*/
        $("#date1").dateSelect();
    </script>
    <script src="{{env('CDN_DOMAIN_NAME')}}/js/addComeGo.js?v=1.0.6"></script>
@endsection